#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;


bool check(int a, int b, int c){
    if(b >= a && b <= c){
        return true;
    }

    if(b <= a && b >= c){
        return true;
    }

    return false;
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int a, b, c;
    cin >> a >> b >> c;
    
    if(check(a, b, c)){
        cout << "Yes" << '\n';
    }else{
        cout << "No" << '\n';
    }
    


    return 0;
}